﻿using SvnAPI.Base.Enumerator;
using System;

namespace SvnAPI.Command.Interface
{
    /// <summary>
    /// Define a default way to execute a look command on svn tool and get a result.
    /// </summary>
    [Obsolete("Interface never used, because there wasn't need of a second implementation yet.", true)]
    interface ILookCommand : IDisposable
    {
        #region Methods

        /// <summary>
        /// Get the author of a revision or transaction in the repository.
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <returns>Return result of execution.</returns>
        IResult Author(ExecutionType executionType);

        /// <summary>
        /// Get the contents of a file.
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <returns>Return result of execution.</returns>
        IResult Cat(ExecutionType executionType);

        /// <summary>
        /// Get the paths that were changed in a particular revision or transaction, as well as “svn update-style” status letters in the first two columns:
        /// 
        /// 'A ' Item added to repository
        /// 'D ' Item deleted from repository
        /// 'U ' File contents changed
        /// '_U' Properties of item changed; note the leading underscore
        /// 'UU' File contents and properties changed
        /// 
        /// Files and directories can be distinguished, as directory paths are displayed with a trailing “/” character.
        /// 
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <param name="isCopyInfo">optional value, true to show detailed copy source information.</param>
        /// <returns>Return the paths that were changed in a particular revision or transaction.</returns>
        /// <returns>Return result of execution.</returns>
        IResult Changed(ExecutionType executionType, Boolean isCopyInfo = false);

        /// <summary>
        /// Get the datestamp of a revision or transaction in a repository.
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <returns>Return result of execution.</returns>
        IResult Date(ExecutionType executionType);

        /// <summary>
        /// Get GNU-style differences of changed files and properties in a repository.
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <param name="isDiffCopyFrom">optional value, true to show differences for copied items against the copy source.</param>
        /// <param name="isNoDiffAdded">optional value, true to show differences for added files.</param>
        /// <param name="isNoDiffDeleted">optional value, true to show differences for deleted files.</param>
        /// <param name="isExtension">optional value, true to show extensions.</param>
        /// <param name="listExtensions">optional value, List of extensions.</param>
        /// <returns>Return result of execution.</returns>
        IResult Diff(ExecutionType executionType, Boolean isDiffCopyFrom = false, Boolean isNoDiffAdded = false, Boolean isNoDiffDeleted = false, Boolean isExtension = false, String[] listExtensions = null);

        /// <summary>
        /// Get the directories that were themselves changed (property edits) or whose file children were changed.
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <returns>Return result of execution.</returns>
        IResult DirsChanged(ExecutionType executionType);

        /// <summary>
        /// Get the file size (in bytes) of the file located at Repository in the HEAD revision of the repository followed by an end-of-line character.
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <returns>Return result of execution.</returns>
        IResult FileSize(ExecutionType executionType);

        /// <summary>
        /// Get the information about the history of a path in the repository (or the root directory if no path is supplied).
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <param name="isShowIds">optional value, true to show the filesystem node revision IDs for each path in the filesystem tree.</param>
        /// <param name="isLimit">optional value, true to limit output to a maximum number of ARG items.</param>
        /// <param name="listLimits">optional value, arguments for limits.</param>
        /// <returns>Return result of execution.</returns>
        IResult History(ExecutionType executionType, Boolean isShowIds = false, Boolean isLimit = false, String[] listLimits = null);

        /// <summary>
        /// Get the author, datestamp, log message size (in bytes), and log message, followed by a newline character.
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <returns>Return result of execution.</returns>
        IResult Info(ExecutionType executionType);

        /// <summary>
        /// Get all information available for the lock at PATH_IN_REPOS. If PATH_IN_REPOS is not locked, print nothing.
        /// </summary>
        /// <returns>Return result of execution.</returns>
        IResult Lock();

        /// <summary>
        /// Get the log message.
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <returns>Return result of execution.</returns>
        IResult Log(ExecutionType executionType);

        /// <summary>
        /// Get the tree, starting at PathInRepository (if supplied; at the root of the tree otherwise), optionally showing node revision IDs.
        /// </summary>
        /// <param name="executionType">Type of execution.</param>
        /// <param name="isFullPaths">optional value, to display full paths instead of hierarchical, indented path components.</param>
        /// <param name="isNonRecursisve">optional value, to operate on a single directory only.</param>
        /// <param name="isShowIds">optional value, true to show the filesystem node revision IDs for each path in the filesystem tree.</param>
        /// <returns>Return result of execution.</returns>
        IResult Tree(ExecutionType executionType, Boolean isFullPaths = false, Boolean isNonRecursisve = false, Boolean isShowIds = false);

        /// <summary>
        /// Get the UUID for the repository. The UUID is the repository's universal unique identifier. 
        /// The Subversion client uses this identifier to differentiate between one repository and another.
        /// </summary>
        /// <returns>Return result of execution.</returns>
        IResult UUId();
        
        /// <summary>
        /// Get the youngest revision number of a repository.
        /// </summary>
        /// <returns>Return result of execution.</returns>
        IResult Youngest();

        #endregion
    }
}
